#ifndef SETTINGWIDGET_H
#define SETTINGWIDGET_H

#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include "view_global.h"
#include <QVBoxLayout>
#include "FramelessWindow.h"
class VIEW_EXPORT SettingWidget : public FramelessWindow
{
    Q_OBJECT
public:
    int getScreenWidth() const;
    void setScreenWidth(int width);
    int getScreenHeight() const;
    void setScreenHeigth(int heigth);
protected:
    void resizeEvent(QResizeEvent *event) override;
public:
    explicit SettingWidget(QWidget *parent = nullptr);
    virtual ~SettingWidget();
    void connectFunction();
protected slots:
    void setupForm();
    void changeEvent(QEvent* event);
private:
    void initForm();
    void setWindowStyle();                   // 设置窗口样式和背景
private:
    // 标题栏
    QWidget* titleWidget;
    QLabel* lblIcon;
    QLabel* lblTitle;
    QPushButton* btnClose;
    QPushButton* btnMax;
    QPushButton* btnMin;
    // 主体
    QWidget* mainWidget;

    int m_nScreenWidth;
    int m_nScreenHeigth;
    int nRet;
    QVBoxLayout *mainLayout;
};

#endif // SETTINGWIDGET_H
